Skip to content

fix(agent-scan): honor provider-configured timeout_ms for HTTP targets - #617

Open
boy-hack wants to merge 1 commit into
mainfrom
fix/agent-scan-http-timeout-ms
Open

fix(agent-scan): honor provider-configured timeout_ms for HTTP targets#617
boy-hack wants to merge 1 commit into
mainfrom
fix/agent-scan-http-timeout-ms

Conversation

@boy-hack

Copy link
Copy Markdown
Collaborator

Summary

  • Fixes agent_scan HTTP provider 忽略配置的 timeout_ms,固定使用默认 30 秒超时 #613: the HTTP provider request path hardcoded the adapter-level default timeout (30s) in httpx.Client(timeout=self.timeout) and never passed the per-provider timeout, so a user-supplied timeout_ms (e.g. 300000 in openclaw.yaml) was silently ignored. Slow agent targets aborted at the 30s default.
  • Add optional timeout_seconds param to _make_http_request (falls back to self.timeout).
  • Thread ProviderConfig.timeout_ms (via existing _get_timeout_seconds) through every HTTP caller: custom HTTP endpoint, standard/template provider, Dify, Coze.
  • Report the effective timeout in the timeout error message.

Verification

  • Reproduced locally before fix (request aborted at 30.3s with timeout_ms=300000).
  • After fix, the same request completes at the configured ~5-minute timeout and succeeds.
  • python3 -m py_compile passes; no external callers of _make_http_request exist.

Note: merge is left to maintainer discretion per project workflow.

The HTTP provider request path hardcoded the adapter-level default
timeout (30s) in httpx.Client(timeout=self.timeout) and never passed the
per-provider timeout. Consequently a user-supplied `timeout_ms` (e.g.
300000 in openclaw.yaml) was silently ignored, causing slow agent
targets to abort at the 30s default.

- Add optional `timeout_seconds` param to `_make_http_request`,
  falling back to `self.timeout` when unset.
- Thread `ProviderConfig.timeout_ms` (via existing
  `_get_timeout_seconds`) through every HTTP caller: custom HTTP
  endpoint, standard/template provider, Dify, and Coze.
- Report the effective timeout in the timeout error message.

Fixes #613. Reproduced locally (request aborted at 30.3s before, now
completes at the configured 5-minute timeout).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

agent_scan HTTP provider 忽略配置的 timeout_ms,固定使用默认 30 秒超时

1 participant